package com.atguigu01.create.runnable;




class EvenNumberPrint implements Runnable {


    @Override
    public void run() {
        for (int i = 0; i <= 100; i++) {
            if(i % 2 != 0) {
                System.out.println(Thread.currentThread().getName() + ":" + i);
            }
        }
    }
}


public class EvenNumberTest {
    public static void main(String[] args) {

        EvenNumberPrint evenNumberPrint = new EvenNumberPrint();

        Thread thread = new Thread(evenNumberPrint);
        Thread thread1 = new Thread(evenNumberPrint);

        thread.start();
        thread1.start();
    }
}
